using Core.DataAccess.Model.Project.Entrepot;
using Core.DataAccess.Model.Project.Information;
using Core.DataAccess.Model.Projects;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;

namespace Core.DataAccess.Model
{
    public class TemporaryDbContextFactory : IDesignTimeDbContextFactory<ProjectInformationContext>
    {
        public ProjectInformationContext CreateDbContext(string[] args)
        {

            var builder = new DbContextOptionsBuilder<ProjectInformationContext>();
            // Information
            // Entrepot

            builder
                .UseSqlServer(
                    "Data Source=47.104.181.71,1398;database=Project.Information;uid=sa;pwd=zhuJIAN320",
                    a => a.UseRowNumberForPaging());

            return new ProjectInformationContext(builder.Options);
        }

    }
}
